package it.kion.util.ui.umenumanager2.model;

import org.eclipse.core.runtime.PlatformObject;

/**
 * @author Andrea Salicetti &lt;<a href="mailto:a.salicetti@kion.it">a.salicetti@kion.it</a>&gt;
 */
public abstract class MenuItem extends PlatformObject {

	private String label = "";

	private Folder parent = null;

	public enum Type {
		FOLDER, ITEM
	};
	
	private final Type type;

	public Type getType() {
		return type;
	}

	public MenuItem(String label, Folder parent, Type type) {
		this.label = label;
		this.parent = parent;
		this.type = type;
	}

	public MenuItem(String label, Type type) {
		this.label = label;
		this.type = type;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public Folder getParent() {
		return parent;
	}

	public void setParent(Folder parent) {
		this.parent = parent;
	}

	public boolean isFolder() {
		return type == Type.FOLDER;
	}

}
